
		<ol class="breadcrumb">
		  <li><a href="/users/index"><i class="fa fa-home"></i>&nbsp;&nbsp;{{__('Personal Center')}}</a></li>
		  <li class="active">{{ __('My Permissions')}}</li>
		</ol>           
       <hr>
       
       	<div class="clearfix">
			<div class="ui-portlet-header">
			      <span class="title">{{ __('My Permissions')}}</span>            
			</div>

			{{$this->Session->flash()}}
			
			<table class="table">
			<thead>
			<tr style="text-align: center;"><td>权限操作</td><td>开始于</td><td>结束于</td><td>状态</td><td>续费</td></tr>
			</thead>
			
			<portlet portlet="body" cache="no" recursive="1" showpages="1" title="支付记录" list_tpl="inner" model="UserRole" info="fields=*&order=UserRole.id desc&conditions[user_id]=$current_user_id&joins[0][table]=roles&joins[0][alias]=Role&joins[0][type]=inner&joins[0][conditions][]=UserRole.role_id=Role.id">
				<tr>
				<td>{{$item_all[Role]['name']}}</td>				
				<td>{{substr($item['started'],0,10)}}</td>
				<td>{{substr($item['ended'],0,10)}}</td>
				<td>
					{{if strtotime($item['ended']) < time()}} <span class="label label-warning">已过期</span> {{else}} <span class="label label-success">有效</span> {{/if}}
				<!-- <a href="/users/permission/{{$item['id']}}">查看详细</a> -->
				</td>
				<td>
					{{if strtotime($item['ended']) < time()}} <a href="http://www.135editor.com/tools/goplat?referer={{urlencode('http://www.135plat.com/roles/view/'.$item_all[Role]['id'])}}" style="margin: 2px;" target="_blank" class="btn btn-warning btn-xs">过期续费</a> {{else}} <a href="http://www.135editor.com/tools/goplat?referer={{urlencode('http://www.135plat.com/roles/view/'.$item_all[Role]['id'])}}" target="_blank" style="margin: 2px;" class="btn btn-primary  btn-xs">续期</a> {{/if}}
				
				</td>
				</tr>
			</portlet>
			
			
			</table>
		</div>
		